cmake_minimum_required(VERSION 3.10)
project(RogueLike-Game)

set(EXE_NAME game)

set(CMAKE_PROJECT_VERSION_MAJOR 0)
set(CMAKE_PROJECT_VERSION_MINOR 0)
set(CMAKE_PROJECT_VERSION_PATCH 1)

set(CMAKE_BUILD_TYPE DEBUG)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)

#include pkg-config
find_package(PkgConfig REQUIRED)

#find SDL2
pkg_check_modules(REQUIRED SDL2 SDL2_image SDL2_ttf SDL2_mixer)
pkg_search_module(SDL2 REQUIRED SDL2)
pkg_search_module(SDL2_image REQUIRED SDL2_image)
pkg_search_module(SDL2_mixer REQUIRED SDL2_mixer)
pkg_search_module(SDL2_ttf REQUIRED SDL2_ttf)

aux_source_directory(src SRC)
set(SRC ${SRC} main.cpp)

include_directories(include ${SDL2_INCLUDE_DIRS} ${SDL2_image_INCLUDE_DIRS} ${SDL2_mixer_INCLUDE_DIRS} ${SDL2_ttf_INCLUDE_DIRS})
link_directories(${SDL2_LIBRARY_DIRS} ${SDL2_mixer_LIBRARY_DIRS} ${SDL2_ttf_LIBRARY_DIRS} ${SDL2_image_LIBRARY_DIRS})
link_libraries(${SDL2_LIBRARIES} ${SDL2_image_LIBRARIES} ${SDL2_mixer_LIBRARIES} ${SDL2_ttf_LIBRARIES})

add_executable(${EXE_NAME} ${SRC})

